<style type="text/css">
    .ui.selection.dropdown.ext {
        min-width: 8em;
    }
    
    .ui.dropdown.ext {
        min-width: 8em;
    }
    
    #container {
        height: 100%;
        width: 100%;
        /*    min-height: 400px;
    min-width:400px;*/
        /*position:absolute;*/
    }
    
    .butt {
        background: #336EAA !important;
    }
    .dimmers {
        margin-top: 55px !important;
        background-color: rgba(0, 0, 0, .99) !important;
    }
</style>

<!--内容区-->
<div class="cont">
    <div class="position "><img alt="位置图标" src="dist/images/position.png" />系统管理&gt;OM管理</div>
    <div class="ui sixteen wide column">
        <!-- Responsive top menu -->
        <div class="ui top attached tabular menu">
            <a class="item active" ng-click="first()" data-tab="first">时长统计</a>
            <a class="item" ng-click="second()" data-tab="second">话务管理</a>
            <a class="item" ng-click="third()" data-tab="third">OM配置</a>
            <a class="item" ng-click="forth()" data-tab="forth">分机配置</a>
        </div>
        <!-- 时长统计 start -->
        <div class="ui bottom attached tab segment active" data-tab="first" style="border: none;">
            <div class="menus">
                <div class="menus_top">
                    <div style="font-weight:bold;display:inline-block;">所属部门</div>
                    <div class="ui selection dropdown" id="ext_num">
                        <input type="hidden" name="extnum" id="extnum" value="">
                        <i class="dropdown icon"></i>
                        <div class="text" id="extnum_id"></div>
                        <div class="menu">
                            <div class="item" ng-repeat="xp in SectorTree|tree2Arr:'_child'" data-value="{{xp.sector_id}}">{{xp.rep}}{{xp.sector_name}}</div>
                        </div>
                    </div>
                    <div style="font-weight:bold;display:inline-block;">分机号</div>
                    <div class="ui input">
                        <input type="text" placeholder="分机号码" ng-model="extid" style="width: 140px;">
                    </div>
                    <div style="font-weight:bold;display:inline-block;">统计时间</div>
                    <div class="ui left icon input">
                        <input type="text" id="createtimeext" style="width:145px" datetimepicker format='YYYY-MM-DD' ng-model="createtimeextlist"  value="" placeholder="开始时间">
                        <i class="calendar icon"></i>
                    </div>
                    <div class="ui left icon input">
                        <input type="text" id="endtimeext" style="width:145px" datetimepicker format='YYYY-MM-DD' ng-model="endtimeextlist" value="" placeholder="结束时间">
                        <i class="calendar icon"></i>
                    </div>
                    <ol style="margin-top: 2px;">
                        <li style="width: 85px;"><a ng-click="searchext()">搜索</a></li>
                        <li style="width: 85px;"><a id="sty1" ng-click="persondisplay()">显示个人</a></li>
                        <li style="width: 85px;"><a id="sty2" ng-click="sectordisplay()">显示部门</a></li>
                    </ol>
                </div>
            </div>
            <div class="menus_con" style="padding-top: 40px;">
                <div id="container"></div>
            </div>
        </div>
        <!-- 时长统计 the end -->

        <!-- 话务管理 start -->
        <div class="ui bottom attached tab segment" data-tab="second" style="border: none;">
            <div class="menus">
                <div class="menus_top">
                    <div class="menus_l">查看方式</div>
                    <ul id="nav">
                        <li class="selected" id="demo1" ng-click="totally()"><a>全部</a></li>
                        <li id="demo2" ng-click="myCom()"><a>我的通话</a></li>
                        <li id="demo3" ng-click="otherCom()"><a>下属通话</a></li>
                    </ul>
                    <ul id="nav">
                        <li id="today" ng-click="getCallogList('today')"><a>今日通话</a></li>
                        <li id="week" ng-click="getCallogList('week')"><a>本周通话</a></li>
                        <li id="month" ng-click="getCallogList('month')"><a>本月通话</a></li>
                    </ul>
                </div>
                <div class="menus_con">
                    <div class="ui basic">
                        <div style="font-weight:bold;display:inline-block;">所属部门</div>
                        <div class="ui selection dropdown ext" id="call_num">
                            <input type="hidden" name="callnum" id="callnum" value="">
                            <i class="dropdown icon"></i>
                            <div class="default text">所属部门</div>
                            <div class="menu">
                                <div class="item" ng-repeat="x in sectors" data-value="{{x.sector_id}}">{{x.sector_name}}</div>
                            </div>
                        </div>
                        <div style="font-weight:bold;display:inline-block;">电话号码</div>
                        <div class="ui input">
                            <input type="text" placeholder="分机号码" ng-model="phonenum" style="width: 130px;">
                        </div>
                        <div style="font-weight:bold;display:inline-block;">员工姓名</div>
                        <div class="ui input">
                            <input type="text" placeholder="员工姓名" ng-model="clerkname" style="width: 130px;">
                        </div>
                        <div style="font-weight:bold;display:inline-block;">沟通时间</div>
                        <div class="ui input">
                            <input type="text" name="createtime" id="createtime" style="width: 130px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" value="" placeholder="开始时间">
                        </div>
                        <div class="ui input">
                            <input type="text" name="endtime" id="endtime" style="width: 130px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" value="" placeholder="结束时间">
                        </div>
                        <button class="ui blue button butt" style="padding-left: 10px;padding-right:10px;margin-right:0px;" ng-click="getCallogList()"><i class="ui search icon"></i>搜索</button>
                    </div>
                </div>
                <div class="menus_table">
                    <table class="ui column table">
                        <thead>
                            <tr>
                                <th style="text-align:center;">上报时间</th>
                                <th style="text-align:center;">电话号码</th>
                                <th style="text-align:center;">通话类型</th>
                                <th style="text-align:center;">归属地</th>
                                <th style="text-align:center;">通话时长</th>
                                <th style="text-align:center;">中继号</th>
                                <th style="text-align:center;">通道服务器</th>
                                <th style="text-align:center;">员工</th>
                                <th style="text-align:center">操作</th>
                            </tr>
                        </thead>
                        <tbody  ng-if="calllogpage.pageAll >= 1">
                            <tr ng-repeat=" cal in calllog ">
                                <td style="text-align:center">{{cal.lasttime}}</td>
                                <td style="text-align:center">{{cal.telephone}}</td>
                                <td style="text-align:center">
                                    <span ng-if="cal.type == 0">打入</span>
                                    <span ng-if="cal.type == 1">打出</span>
                                    <span ng-if="cal.type == 2">呼叫转移入</span>
                                    <span ng-if="cal.type == 3">呼叫转移出</span>
                                    <span ng-if="cal.type == 4">内部通话</span>
                                    <span ng-if="cal.type == 5">双向外通</span>
                                </td>
                                <td style="text-align:center">{{cal.area}}</td>
                                <td style="text-align:center">{{cal.calltime}}</td>
                                <td style="text-align:center">{{cal.trunknumber}}</td>
                                <td style="text-align:center">{{cal.route}}</td>
                                <td style="text-align:center">{{cal.nickname}}</td>
                                <td style="text-align:center">
                                    <button class="ui small blue icon button butt" ng-show="cal.calltime !=0"><i class="ui edit icon"></i>听录音</button>
                                </td>
                            </tr>
                        </tbody>
                        <tbody  ng-show="calllogpage.pageAll < 1">
                              <tr>
                                <td colspan="9" style="color:red;">
                                     <p style="text-align:center;">没有找到数据~~~</p>
                                </td>
                              </tr>
                        </tbody>
                        <tfoot ng-show="calllogpage.pageAll > 1">
                            <tr>
                                <th colspan="9">
                                    <div class="ui pagination menu" jspagination page-object="calllogpage" page-func="getCallogList"></div>
                                </th>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
        <!-- 话务管理 the end -->

        <!-- OM配置 start -->
        <div class="ui bottom attached tab segment" data-tab="third" style="border: none;">
            <div class="ui right floated main menu">
                <span class="ui blue button butt" ng-click="AddConfig()" style="margin-right:0px;"><i class="plus icon" ></i>添加配置</span>
            </div>
            <div class="menus_table" style="margin-top: -45px;">
                <table class="ui column table">
                    <thead>
                        <tr>
                            <th style="text-align:center;">编号</th>
                            <th style="text-align:center;">名称</th>
                            <th style="text-align:center;">代理程序地址</th>
                            <th style="text-align:center;">IPPBX地址</th>
                            <th style="text-align:center;">录音服务器地址</th>
                            <th style="text-align:center;">录音文件夹</th>
                            <th style="text-align:center;">操作</th>
                        </tr>
                    </thead>
                    <tbody ng-show="calllogpage.pageAll >= 1">
                        <tr ng-repeat=" calOM in calllogOM ">
                            <td style="text-align:center">{{calOM.omid}}</td>
                            <td style="text-align:center">{{calOM.name}}</td>
                            <td style="text-align:center">{{calOM.ipaddr}}</td>
                            <td style="text-align:center">{{calOM.serverip}}</td>
                            <td style="text-align:center">{{calOM.mp3_server}}</td>
                            <td style="text-align:center">{{calOM.mp3_dir}}</td>
                            <td style="text-align:center">
                                <button class="ui small blue butt icon button" ng-click="editOM()"><i class="edit icon"></i>编辑</button>
                            </td>
                        </tr>
                    </tbody>
                    <tbody ng-show="calllogpage.pageAll < 1">
                          <tr>
                            <td colspan="9" style="color:red;">
                                 <p style="text-align:center;">没有找到数据~~~</p>
                            </td>
                          </tr>
                    </tbody>
                </table>
                <tfoot ng-show="calllogpage.pageAll > 1">
                    <tr>
                        <th colspan="9">
                            <div id="the-endOM" class="ui pagination menu" jspagination page-object="calllogpage" page-func="getCallogList"></div>
                        </th>
                    </tr>
                </tfoot>
            </div>
        </div>

        <!-- OM配置 the end -->

        <!-- 分机配置 start -->
        <div class="ui bottom attached tab segment" data-tab="forth" style="border: none;">
            <div style="font-weight:bold;display:inline-block;">所属部门</div>
            <div class="ui selection dropdown" id="ext_add">
                <input type="hidden" name="extadd" id="extadd" value="">
                <i class="dropdown icon"></i>
                <div class="default text">所属部门</div>
                <div class="menu">
                    <div class="item" ng-repeat="xp in SectorTree|tree2Arr:'_child'" data-value="{{xp.sector_id}}">{{xp.rep}}{{xp.sector_name}}</div>
                </div>
            </div>
            <div style="font-weight:bold;display:inline-block;">分机号</div>
            <div class="ui input">
                <input type="text" placeholder="分机号码" ng-model="subphones" style="width: 184px;" id="subphones">
            </div>
            <div style="font-weight:bold;display:inline-block;">员工姓名</div>
            <div class="ui input">
                <input type="text" placeholder="员工姓名" ng-model="paypersons" style="width: 184px;" id="paypersons">
            </div>
            <button class="ui blue button butt" ng-click="OmDataList()"><i class="ui search icon"></i>搜索</button>
            <div class="ui right floated main menu">
                <span class="ui blue button butt" ng-click="addConfig()" style="margin-right:0px;"><i class="plus icon" ></i>添加分机</span>
            </div>
            <div class="ui divider"></div>
            <div class="ui grid row">
                <div class="ui three wide column">
                    <div class="ui vertical menu">
                        <div class="ui header item" id="omtype" style="text-align:center;">按照分类查看</div>
                        <a class="teal {{om.cs}} item" style="text-align:center;" data="{{om.k}}" ng-click="Omtypepass(om.m,om.k)" ng-repeat="om in OMs">{{om.v}}</a>
                    </div>
                </div>
                <div class="ui thirteen wide column">
                    <div class="menus_table" style="margin-top: -80px;">
                        <table class="ui column table">
                            <thead>
                                <tr>
                                    <th style="text-align:center;">员工</th>
                                    <th style="text-align:center;">分机号</th>
                                    <th style="text-align:center;">员工姓名</th>
                                    <th style="text-align:center;">所属设备</th>
                                    <th style="text-align:center;">操作</th>
                                </tr>
                            </thead>
                            <tbody ng-show="calllogpage.pageAll >= 1">
                                <tr ng-repeat=" vom in Omtrans">
                                    <td style="text-align:center;">{{$index+1}}</td>
                                    <td style="text-align:center;">{{vom.subphone}}</td>
                                    <td style="text-align:center;">{{vom.nickname}}</td>
                                    <td style="text-align:center;">{{vom.name}}</td>
                                    <td style="text-align:center;">
                                        <button class="ui small blue icon button butt" rel="{{vlog.log_id}}" ng-click="editphone()"><i class="edit icon"></i>编辑</button>
                                    </td>
                                </tr>
                            </tbody>
                            <tbody ng-show="calllogpage.pageAll < 1">
                              <tr>
                                <td colspan="9" style="color:red;">
                                     <p style="text-align:center;">没有找到数据~~~</p>
                                </td>
                              </tr>
                            </tbody>
                            <tfoot ng-show="calllogpage.pageAll > 1">
                                <tr>
                                    <th colspan="9">
                                        <div class="ui pagination menu" jspagination page-object="calllogpage" page-func="OmDataList"></div>
                                    </th>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <!-- 分机配置 the end -->
    </div>
</div>

<!--OM配置添加-->
<div class="ui add modal">
    <i class="close icon"></i>
    <div class="header_h4">添加OM配置</div>
    <div class="content">
        <div class="form">
            <form action="#" name="frm-addnew" id="OMid">
                <div class="ui form">
                    <div class="fields">
                        <div class="eight wide field required">
                            <label>配置名称</label>
                            <input type="text" name="add_name" placeholder="配置名称">
                        </div>
                        <div class="seven wide field required">
                            <label>代理程序地址</label>
                            <input type="text" name="add_address" placeholder="代理程序地址">
                        </div>
                    </div>
                    <div class="fields">
                        <div class="twelve wide required field">
                            <label>IPPBX地址</label>
                            <input type="text" name="add_IPPBX" placeholder="资金量">
                        </div>
                        <div class="three wide field required">
                            <label>端口</label>
                            <input type="text" name="port" placeholder="端口">
                        </div>
                    </div>
                    <div class="fields">
                        <div class="twelve wide required field">
                            <label>录音程序地址</label>
                            <input type="text" name="add_record" placeholder="录音程序地址">
                        </div>
                        <div class="three wide field required">
                            <label>录音目录</label>
                            <input type="text" name="add_list" placeholder="录音目录">
                        </div>
                    </div>
                    <label>代理程序数据库配置</label>
                    <div class="ui divider"></div>
                    <div class="fields">
                        <div class="twelve wide required field">
                            <label>访问地址</label>
                            <input type="text" name="add_Ads" placeholder="访问地址">
                        </div>
                        <div class="three wide field required">
                            <label>端口</label>
                            <input type="text" name="add_port" placeholder="端口">
                        </div>
                    </div>
                    <div class="fields">
                        <div class="nine wide required field">
                            <label>用户名</label>
                            <input type="text" name="add_cname" placeholder="用户名">
                        </div>
                        <div class="three wide field required">
                            <label>密码</label>
                            <input type="password" name="add_pass" placeholder="密码">
                        </div>
                        <div class="three wide field required">
                            <label>数据库名称</label>
                            <input type="text" name="database" placeholder="数据库名称">
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="actions" style="padding:14px;">
            <div class="center" style="margin-bottom:10px;">
                <div class="ui pop_btn_qd positive">{{'BTN_OK' | translate}}</div>            
                <div class="ui pop_btn_qx negative">{{'BTN_CANCEL' | translate}}</div>
            </div>
        </div>
    </div>
</div>

<!--OM配置编辑-->
<div class="ui edit modal">
    <i class="close icon"></i>
    <div class="header_h4">编辑OM配置</div>
    <div class="content">
        <div class="form">
            <form action="#" name="eidtOMid" id="eidtOMid">
                <div class="ui form">
                    <input type="hidden" name="omid" id="omid">
                    <div class="fields">
                        <div class="eight wide field required">
                            <label>配置名称</label>
                            <input type="text" name="add_name1" id="add_name1" placeholder="配置名称">
                        </div>
                        <div class="seven wide field required">
                            <label>代理程序地址</label>
                            <input type="text" name="add_address1" id="add_address1" placeholder="代理程序地址">
                        </div>
                    </div>
                    <div class="fields">
                        <div class="twelve wide required field">
                            <label>IPPBX地址</label>
                            <input type="text" name="add_IPPBX1" id="add_IPPBX1" placeholder="资金量">
                        </div>
                        <div class="three wide field required">
                            <label>端口</label>
                            <input type="text" name="port1" id="port1" placeholder="端口">
                        </div>
                    </div>
                    <div class="fields">
                        <div class="twelve wide required field">
                            <label>录音程序地址</label>
                            <input type="text" name="add_record1" id="add_record1" placeholder="录音程序地址">
                        </div>
                        <div class="three wide field required">
                            <label>录音目录</label>
                            <input type="text" name="add_list1" id="add_list1" placeholder="录音目录">
                        </div>
                    </div>
                    <label>代理程序数据库配置</label>
                    <div class="ui divider"></div>
                    <div class="fields">
                        <div class="twelve wide required field">
                            <label>访问地址</label>
                            <input type="text" name="add_Ads1" id="add_Ads1" placeholder="访问地址">
                        </div>
                        <div class="three wide field required">
                            <label>端口</label>
                            <input type="text" name="add_port1" id="add_port1" placeholder="端口">
                        </div>
                    </div>
                    <div class="fields">
                        <div class="nine wide required field">
                            <label>用户名</label>
                            <input type="text" name="add_cname1" id="add_cname1" placeholder="用户名">
                        </div>
                        <div class="three wide field required">
                            <label>密码</label>
                            <input type="text" name="add_pass1" id="add_pass1" placeholder="密码">
                        </div>
                        <div class="three wide field required">
                            <label>数据库名称</label>
                            <input type="text" name="database1" id="database1" placeholder="数据库名称">
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="actions" style="padding:14px;">
            <div class="center" style="margin-bottom:10px;">
                <div class="ui pop_btn_qd positive">{{'BTN_OK' | translate}}</div>           
                <div class="ui pop_btn_qx negative">{{'BTN_CANCEL' | translate}}</div>
            </div>
        </div>
    </div>
</div>

<!-- 分机配置添加界面 -->
<div class="ui om modal">
    <i class="close icon"></i>
    <div class="header_h4">添加分机</div>
    <div class="content">
        <div class="form">
            <form name="addID" class="ui fluid form " id="addID">
                <label>绑定员工:</label>
                <div class="field">
                    <div class="ui icon input">
                        <angucomplete-alt id="bindperson" focus-in="focusIn()" focus-out="focusOut()" placeholder="绑定员工" pause="100" selected-object="selected" local-data="getnum" search-fields="nickname" title-field="nickname" minlength="0" field-required="true" input-class="form-control form-control-small"></angucomplete-alt>
                    </div>
                </div>
                <label>分机号:</label>
                <div class="field">
                    <input id="subtelphone" name="subtelphone" placeholder="分机号" style="width:100%;">
                </div>
                <label>所属设备:</label>
                <div class="field">
                    <select name="add_device" style="width:100%;display:inline-block;" id="add_device" class="ui dropdown">
                        <option value="">所属设备</option>
                        <option ng-repeat="omc in OMc" value="{{omc.omid}}" placeholder="设备编号">{{omc.name}}</option>
                    </select>
                </div>
            </form>
        </div>
        <div class="actions" style="padding:14px;">
            <div class="center" style="margin-bottom:10px;">
                <div class="ui pop_btn_qd positive">{{'BTN_OK' | translate}}</div>
                <div class="ui pop_btn_qx negative">{{'BTN_CANCEL' | translate}}</div>
            </div>
        </div>
    </div>
</div>


<!-- 分机配置编辑界面 -->
<div class="ui om1 modal">
    <i class="close icon"></i>
    <div class="header_h4">编辑分机</div>
    <div class="content">
        <div class="form">
            <form name="editID" class="ui fluid form " id="editID">
                <div style="display:inline-block;">绑定员工:</div>
                <input type="hidden" name="subid" id="subid" value="">
                <div class="field">
                    <input type="text" placeholder="绑定员工" id="bindperson1" name="bindperson1" style="width:100%;" />
                </div>
                <label>分机号:</label>
                <div class="field">
                    <input id="subtelphone1" name="subtelphone1" placeholder="分机号" style="width:100%;">
                </div>
                <div>
                    <label>所属设备:</label>
                    <div class="field">
                        <div class="ui selection dropdown editom" id="editchannal">
                            <input type="hidden" name="add_device1" id="add_device1" value="">
                            <i class="dropdown icon"></i>
                            <div class="text" id="default_om"></div>
                            <div class="menu">
                                <div class="item" ng-repeat="omc in OMc" data-value="{{omc.omid}}" placeholdeer="设备编号">{{omc.name}}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="actions" style="padding:14px;">
        <div class="center" style="margin-bottom:10px;">
            <div class="ui pop_btn_qd positive">{{'BTN_OK' | translate}}</div>        
            <div class="ui pop_btn_qx negative">{{'BTN_CANCEL' | translate}}</div>
        </div>
    </div>
</div>
<!-- 系统信息弹出层 is ending here-->
<div class="ui systemerror modal transition ">
    <div class="header_h4 ">系统提示</div>
    <div class="content ">
        <div class="inline fluid fields ">
            <div class="field " style="display: inline-block;width: 5%; " ng-show="omrcode == 1 ">
                <i class="thumbs up large icon "></i>
            </div>
            <div class="field " style="display: inline-block;width: 5%; " ng-show="omrcode == 0 ">
                <i class="thumbs down large icon "></i>
            </div>
            <div class="field " style="display: inline-block; ">
                <p>{{omMsg}}</p>
            </div>
        </div>
        <div class="actions " style="padding:14px; ">
            <div class="center " style="margin-bottom:10px; ">
                <div class="ui pop_btn_qx negative ">关闭</div>
            </div>
        </div>
    </div>
</div>
<!-- 系统信息弹出层 is ending here-->
<script type="text/javascript">
    $('#sty1').click(function() {
        $(this).addClass('selected');
    })
    $("#nav li").click(function() {
        $(this).addClass('selected').siblings().removeClass('selected');
    });
    $('#bindperson').css('width', '858px');
    $(".ui.selection.dropdown.editom").addClass("disabled");
    $('.menu .item').tab();
    $(function() {
        $('.ui.dropdown').dropdown();
        $('#OMid').form({
            on: 'blur',
            inline: true,
            fields: {
                add_name: {
                    identifier: 'add_name',
                    rules: [{
                        type: 'empty',
                        prompt: '配置名称不能为空'
                    }]
                },
                add_address: {
                    identifier: 'add_address',
                    rules: [{
                        type: 'empty',
                        prompt: '代理程序地址不能为空'
                    }]
                },
                add_IPPBX: {
                    identifier: 'add_IPPBX',
                    rules: [{
                        type: 'empty',
                        prompt: 'IPPBX地址不能为空'
                    }]
                },
                port: {
                    identifier: 'port',
                    rules: [{
                        type: 'empty',
                        prompt: '端口不能为空'
                    }]
                },
                add_record: {
                    identifier: 'add_record',
                    rules: [{
                        type: 'empty',
                        prompt: '录音程序地址不能为空'
                    }]
                },
                add_list: {
                    identifier: 'add_list',
                    rules: [{
                        type: 'empty',
                        prompt: '录音目录不能为空'
                    }]
                },
                add_Ads: {
                    identifier: 'add_Ads',
                    rules: [{
                        type: 'empty',
                        prompt: '访问地址不能为空'
                    }]
                },
                add_port: {
                    identifier: 'add_port',
                    rules: [{
                        type: 'empty',
                        prompt: '端口号不能为空'
                    }]
                },
                add_cname: {
                    identifier: 'add_cname',
                    rules: [{
                        type: 'empty',
                        prompt: '用户名不能为空'
                    }]
                },
                add_pass: {
                    identifier: 'add_pass',
                    rules: [{
                        type: 'empty',
                        prompt: '密码不能为空'
                    }]
                },
                database: {
                    identifier: 'database',
                    rules: [{
                        type: 'empty',
                        prompt: '数据库名称不能为空'
                    }]
                }

            }
        });

        $('#eidtOMid').form({
            on: 'blur',
            inline: true,
            fields: {
                add_name1: {
                    identifier: 'add_name1',
                    rules: [{
                        type: 'empty',
                        prompt: '配置名称不能为空'
                    }]
                },
                add_address1: {
                    identifier: 'add_address1',
                    rules: [{
                        type: 'empty',
                        prompt: '代理程序地址不能为空'
                    }]
                },
                add_IPPBX1: {
                    identifier: 'add_IPPBX1',
                    rules: [{
                        type: 'empty',
                        prompt: 'IPPBX地址不能为空'
                    }]
                },
                port1: {
                    identifier: 'port1',
                    rules: [{
                        type: 'empty',
                        prompt: '端口不能为空'
                    }]
                },
                add_record1: {
                    identifier: 'add_record1',
                    rules: [{
                        type: 'empty',
                        prompt: '录音程序地址不能为空'
                    }]
                },
                add_list1: {
                    identifier: 'add_list1',
                    rules: [{
                        type: 'empty',
                        prompt: '录音目录不能为空'
                    }]
                },
                add_Ads1: {
                    identifier: 'add_Ads1',
                    rules: [{
                        type: 'empty',
                        prompt: '访问地址不能为空'
                    }]
                },
                add_port1: {
                    identifier: 'add_port1',
                    rules: [{
                        type: 'empty',
                        prompt: '端口号不能为空'
                    }]
                },
                add_cname1: {
                    identifier: 'add_cname1',
                    rules: [{
                        type: 'empty',
                        prompt: '用户名不能为空'
                    }]
                },
                add_pass1: {
                    identifier: 'add_pass1',
                    rules: [{
                        type: 'empty',
                        prompt: '密码不能为空'
                    }]
                },
                database1: {
                    identifier: 'database1',
                    rules: [{
                        type: 'empty',
                        prompt: '数据库名称不能为空'
                    }]
                }

            }
        });


        $('#addID').form({
            on: 'blur',
            inline: true,
            fields: {
                bindperson: {
                    identifier: 'bindperson',
                    rules: [{
                        type: 'empty',
                        prompt: '绑定员工不能为空'
                    }]
                },
                subtelphone: {
                    identifier: 'subtelphone',
                    rules: [{
                        type: 'empty',
                        prompt: '分机号不能为空'
                    }]
                },
                add_device: {
                    identifier: 'add_device',
                    rules: [{
                        type: 'empty',
                        prompt: '所属设备不能为空'
                    }]
                }
            }
        });

        $('#editID').form({
            on: 'blur',
            inline: true,
            fields: {
                bindperson1: {
                    identifier: 'bindperson1',
                    rules: [{
                        type: 'empty',
                        prompt: '绑定员工不能为空'
                    }]
                },
                subtelphone1: {
                    identifier: 'subtelphone1',
                    rules: [{
                        type: 'empty',
                        prompt: '分机号不能为空'
                    }]
                },
                add_device1: {
                    identifier: 'add_device1',
                    rules: [{
                        type: 'empty',
                        prompt: '所属设备不能为空'
                    }]
                }
            }
        });
    });
</script>